﻿Imports System.Text
Namespace Transaction
    Public Class clsTSALESRow
        Inherits ADODBU.RowClass
        Private mVar_SLSID As System.Int32
        Private mVar_SLSNO As System.String
        Private mVar_SLSDATE As System.DateTime
        Private mVar_SLSNOTA As System.String
        Private mVar_SLSSTORE As System.String
        Private mVar_SLSARTCEXT As System.String
        Private mVar_SLSBARCODE As System.String
        Private mVar_SLSSIZE As System.String
        Private mVar_SLSCOLOR As System.String
        Private mVar_SLSQTY As System.Int32
        Private mVar_SLSDISC As System.String
        Private mVar_SLSDISCAMOUNT As System.Decimal
        Private mVar_SLSAMT As System.Decimal
        Private mVar_SLSTOTAMT As System.Decimal
        Private mVar_SLSPRICE As System.Decimal
        Private mVar_SLSFLAG As System.Int32
        Private mVar_SLSSTAT As System.Int32
        Private mVar_SLSSPV As System.String
        Private mVar_SLSDAPR As System.DateTime
        Private mVar_SLRDCRE As System.DateTime
        Private mVar_SLRDMAJ As System.DateTime
        Private mVar_SLRUTIL As System.String
        Private mVar_SLRPROG As System.String
        Private mVar_SLUSRUPD As System.String
        Private mVar_DirtySLSID As Boolean = False
        Private mVar_DirtySLSNO As Boolean = False
        Private mVar_DirtySLSDATE As Boolean = False
        Private mVar_DirtySLSNOTA As Boolean = False
        Private mVar_DirtySLSSTORE As Boolean = False
        Private mVar_DirtySLSARTCEXT As Boolean = False
        Private mVar_DirtySLSBARCODE As Boolean = False
        Private mVar_DirtySLSSIZE As Boolean = False
        Private mVar_DirtySLSCOLOR As Boolean = False
        Private mVar_DirtySLSQTY As Boolean = False
        Private mVar_DirtySLSDISC As Boolean = False
        Private mVar_DirtySLSDISCAMOUNT As Boolean = False
        Private mVar_DirtySLSAMT As Boolean = False
        Private mVar_DirtySLSTOTAMT As Boolean = False
        Private mVar_DirtySLSPRICE As Boolean = False
        Private mVar_DirtySLSFLAG As Boolean = False
        Private mVar_DirtySLSSTAT As Boolean = False
        Private mVar_DirtySLSSPV As Boolean = False
        Private mVar_DirtySLSDAPR As Boolean = False
        Private mVar_DirtySLRDCRE As Boolean = False
        Private mVar_DirtySLRDMAJ As Boolean = False
        Private mVar_DirtySLRUTIL As Boolean = False
        Private mVar_DirtySLRPROG As Boolean = False
        Private mVar_DirtySLUSRUPD As Boolean = False
        Private mIsOnInit As Boolean
        Public DataSource As ADODBU.Recordset
        Public RowOrigin As clsTSALESRow
        ''[------------------------------------------------------------------------]'
        Public Sub New()
            RowOrigin = New clsTSALESRow(True)
        End Sub
        ''[------------------------------------------------------------------------]'
        Friend Sub New(ByVal lCut As Boolean)
            '--- untuk memutus loop reference 
        End Sub
        ''[------------------------------------------------------------------------]'
        ''' <summary>
        ''' create new this class from inherited of this class or its self
        ''' </summary>
        ''' <param name="recdataRow"></param>
        ''' <remarks></remarks>
        Public Sub New(ByVal recdataRow As ADODBU.RowClass)
            RowOrigin = New clsTSALESRow(True)
            Me.JoinValue(recdataRow)
        End Sub
        ''[------------------------------------------------------------------------]'
        Public Sub New(ByVal recData As ADODBU.Recordset)
            RowOrigin = New clsTSALESRow(True)
            DataSource = recData
            Try
                InitVar(recData.GetCurrentDataRow)
            Catch
            End Try
        End Sub

        ''[------------------------------------------------------------------------]'
        Public Sub New(ByVal recdataRow As DataRow)
            RowOrigin = New clsTSALESRow(True)
            InitVar(recdataRow)
        End Sub

#Region "Initialize vars "
        ''[------------------------------------------------------------------------]'
        Private Sub InitVar(ByVal Fields As DataRow)
            Try
                mVar_SLSID = Fields("SLSID")
                RowOrigin.SLSID = mVar_SLSID
            Catch e As Exception
            End Try
            Try
                mVar_SLSNO = Fields("SLSNO")
                RowOrigin.SLSNO = mVar_SLSNO
            Catch e As Exception
            End Try
            Try
                mVar_SLSDATE = Fields("SLSDATE")
                RowOrigin.SLSDATE = mVar_SLSDATE
            Catch e As Exception
            End Try
            Try
                mVar_SLSNOTA = Fields("SLSNOTA")
                RowOrigin.SLSNOTA = mVar_SLSNOTA
            Catch e As Exception
            End Try
            Try
                mVar_SLSSTORE = Fields("SLSSTORE")
                RowOrigin.SLSSTORE = mVar_SLSSTORE
            Catch e As Exception
            End Try
            Try
                mVar_SLSARTCEXT = Fields("SLSARTCEXT")
                RowOrigin.SLSARTCEXT = mVar_SLSARTCEXT
            Catch e As Exception
            End Try
            Try
                mVar_SLSBARCODE = Fields("SLSBARCODE")
                RowOrigin.SLSBARCODE = mVar_SLSBARCODE
            Catch e As Exception
            End Try
            Try
                mVar_SLSSIZE = Fields("SLSSIZE")
                RowOrigin.SLSSIZE = mVar_SLSSIZE
            Catch e As Exception
            End Try
            Try
                mVar_SLSCOLOR = Fields("SLSCOLOR")
                RowOrigin.SLSCOLOR = mVar_SLSCOLOR
            Catch e As Exception
            End Try
            Try
                mVar_SLSQTY = Fields("SLSQTY")
                RowOrigin.SLSQTY = mVar_SLSQTY
            Catch e As Exception
            End Try
            Try
                mVar_SLSDISC = Fields("SLSDISC")
                RowOrigin.SLSDISC = mVar_SLSDISC
            Catch e As Exception
            End Try
            Try
                mVar_SLSDISCAMOUNT = Fields("SLSDISCAMOUNT")
                RowOrigin.SLSDISCAMOUNT = mVar_SLSDISCAMOUNT
            Catch e As Exception
            End Try
            Try
                mVar_SLSAMT = Fields("SLSAMT")
                RowOrigin.SLSAMT = mVar_SLSAMT
            Catch e As Exception
            End Try
            Try
                mVar_SLSTOTAMT = Fields("SLSTOTAMT")
                RowOrigin.SLSTOTAMT = mVar_SLSTOTAMT
            Catch e As Exception
            End Try
            Try
                mVar_SLSPRICE = Fields("SLSPRICE")
                RowOrigin.SLSPRICE = mVar_SLSPRICE
            Catch e As Exception
            End Try
            Try
                mVar_SLSFLAG = Fields("SLSFLAG")
                RowOrigin.SLSFLAG = mVar_SLSFLAG
            Catch e As Exception
            End Try
            Try
                mVar_SLSSTAT = Fields("SLSSTAT")
                RowOrigin.SLSSTAT = mVar_SLSSTAT
            Catch e As Exception
            End Try
            Try
                mVar_SLSSPV = Fields("SLSSPV")
                RowOrigin.SLSSPV = mVar_SLSSPV
            Catch e As Exception
            End Try
            Try
                mVar_SLSDAPR = Fields("SLSDAPR")
                RowOrigin.SLSDAPR = mVar_SLSDAPR
            Catch e As Exception
            End Try
            Try
                mVar_SLRDCRE = Fields("SLRDCRE")
                RowOrigin.SLRDCRE = mVar_SLRDCRE
            Catch e As Exception
            End Try
            Try
                mVar_SLRDMAJ = Fields("SLRDMAJ")
                RowOrigin.SLRDMAJ = mVar_SLRDMAJ
            Catch e As Exception
            End Try
            Try
                mVar_SLRUTIL = Fields("SLRUTIL")
                RowOrigin.SLRUTIL = mVar_SLRUTIL
            Catch e As Exception
            End Try
            Try
                mVar_SLRPROG = Fields("SLRPROG")
                RowOrigin.SLRPROG = mVar_SLRPROG
            Catch e As Exception
            End Try
            Try
                mVar_SLUSRUPD = Fields("SLUSRUPD")
                RowOrigin.SLUSRUPD = mVar_SLUSRUPD
            Catch e As Exception
            End Try
        End Sub


#End Region
        ''[------------------------------------------------------------------------]'
#Region "Properties"
        Public Property SLSID As System.Int32
            Get
                Return mVar_SLSID
            End Get
            Set(ByVal Value As System.Int32)
                mVar_SLSID = Value
                Me.OnPropertyChanged(New System.ComponentModel.PropertyChangedEventArgs("SLSID"))
                If Not mIsOnInit Then
                    mVar_DirtySLSID = True
                End If
            End Set
        End Property
        Public Property SLSNO As System.String
            Get
                Return mVar_SLSNO
            End Get
            Set(ByVal Value As System.String)
                mVar_SLSNO = Value
                Me.OnPropertyChanged(New System.ComponentModel.PropertyChangedEventArgs("SLSNO"))
                If Not mIsOnInit Then
                    mVar_DirtySLSNO = True
                End If
            End Set
        End Property
        Public Property SLSDATE As System.DateTime
            Get
                Return mVar_SLSDATE
            End Get
            Set(ByVal Value As System.DateTime)
                mVar_SLSDATE = Value
                Me.OnPropertyChanged(New System.ComponentModel.PropertyChangedEventArgs("SLSDATE"))
                If Not mIsOnInit Then
                    mVar_DirtySLSDATE = True
                End If
            End Set
        End Property
        Public Property SLSNOTA As System.String
            Get
                Return mVar_SLSNOTA
            End Get
            Set(ByVal Value As System.String)
                mVar_SLSNOTA = Value
                Me.OnPropertyChanged(New System.ComponentModel.PropertyChangedEventArgs("SLSNOTA"))
                If Not mIsOnInit Then
                    mVar_DirtySLSNOTA = True
                End If
            End Set
        End Property
        Public Property SLSSTORE As System.String
            Get
                Return mVar_SLSSTORE
            End Get
            Set(ByVal Value As System.String)
                mVar_SLSSTORE = Value
                Me.OnPropertyChanged(New System.ComponentModel.PropertyChangedEventArgs("SLSSTORE"))
                If Not mIsOnInit Then
                    mVar_DirtySLSSTORE = True
                End If
            End Set
        End Property
        Public Property SLSARTCEXT As System.String
            Get
                Return mVar_SLSARTCEXT
            End Get
            Set(ByVal Value As System.String)
                mVar_SLSARTCEXT = Value
                Me.OnPropertyChanged(New System.ComponentModel.PropertyChangedEventArgs("SLSARTCEXT"))
                If Not mIsOnInit Then
                    mVar_DirtySLSARTCEXT = True
                End If
            End Set
        End Property
        Public Property SLSBARCODE As System.String
            Get
                Return mVar_SLSBARCODE
            End Get
            Set(ByVal Value As System.String)
                mVar_SLSBARCODE = Value
                Me.OnPropertyChanged(New System.ComponentModel.PropertyChangedEventArgs("SLSBARCODE"))
                If Not mIsOnInit Then
                    mVar_DirtySLSBARCODE = True
                End If
            End Set
        End Property
        Public Property SLSSIZE As System.String
            Get
                Return mVar_SLSSIZE
            End Get
            Set(ByVal Value As System.String)
                mVar_SLSSIZE = Value
                Me.OnPropertyChanged(New System.ComponentModel.PropertyChangedEventArgs("SLSSIZE"))
                If Not mIsOnInit Then
                    mVar_DirtySLSSIZE = True
                End If
            End Set
        End Property
        Public Property SLSCOLOR As System.String
            Get
                Return mVar_SLSCOLOR
            End Get
            Set(ByVal Value As System.String)
                mVar_SLSCOLOR = Value
                Me.OnPropertyChanged(New System.ComponentModel.PropertyChangedEventArgs("SLSCOLOR"))
                If Not mIsOnInit Then
                    mVar_DirtySLSCOLOR = True
                End If
            End Set
        End Property
        Public Property SLSQTY As System.Int32
            Get
                Return mVar_SLSQTY
            End Get
            Set(ByVal Value As System.Int32)
                mVar_SLSQTY = Value
                Me.OnPropertyChanged(New System.ComponentModel.PropertyChangedEventArgs("SLSQTY"))
                If Not mIsOnInit Then
                    mVar_DirtySLSQTY = True
                End If
            End Set
        End Property
        Public Property SLSDISC As System.String
            Get
                Return mVar_SLSDISC
            End Get
            Set(ByVal Value As System.String)
                mVar_SLSDISC = Value
                Me.OnPropertyChanged(New System.ComponentModel.PropertyChangedEventArgs("SLSDISC"))
                If Not mIsOnInit Then
                    mVar_DirtySLSDISC = True
                End If
            End Set
        End Property
        Public Property SLSDISCAMOUNT As System.Decimal
            Get
                Return mVar_SLSDISCAMOUNT
            End Get
            Set(ByVal Value As System.Decimal)
                mVar_SLSDISCAMOUNT = Value
                Me.OnPropertyChanged(New System.ComponentModel.PropertyChangedEventArgs("SLSDISCAMOUNT"))
                If Not mIsOnInit Then
                    mVar_DirtySLSDISCAMOUNT = True
                End If
            End Set
        End Property
        Public Property SLSAMT As System.Decimal
            Get
                Return mVar_SLSAMT
            End Get
            Set(ByVal Value As System.Decimal)
                mVar_SLSAMT = Value
                Me.OnPropertyChanged(New System.ComponentModel.PropertyChangedEventArgs("SLSAMT"))
                If Not mIsOnInit Then
                    mVar_DirtySLSAMT = True
                End If
            End Set
        End Property
        Public Property SLSTOTAMT As System.Decimal
            Get
                Return mVar_SLSTOTAMT
            End Get
            Set(ByVal Value As System.Decimal)
                mVar_SLSTOTAMT = Value
                Me.OnPropertyChanged(New System.ComponentModel.PropertyChangedEventArgs("SLSTOTAMT"))
                If Not mIsOnInit Then
                    mVar_DirtySLSTOTAMT = True
                End If
            End Set
        End Property
        Public Property SLSPRICE As System.Decimal
            Get
                Return mVar_SLSPRICE
            End Get
            Set(ByVal Value As System.Decimal)
                mVar_SLSPRICE = Value
                Me.OnPropertyChanged(New System.ComponentModel.PropertyChangedEventArgs("SLSPRICE"))
                If Not mIsOnInit Then
                    mVar_DirtySLSPRICE = True
                End If
            End Set
        End Property
        Public Property SLSFLAG As System.Int32
            Get
                Return mVar_SLSFLAG
            End Get
            Set(ByVal Value As System.Int32)
                mVar_SLSFLAG = Value
                Me.OnPropertyChanged(New System.ComponentModel.PropertyChangedEventArgs("SLSFLAG"))
                If Not mIsOnInit Then
                    mVar_DirtySLSFLAG = True
                End If
            End Set
        End Property
        Public Property SLSSTAT As System.Int32
            Get
                Return mVar_SLSSTAT
            End Get
            Set(ByVal Value As System.Int32)
                mVar_SLSSTAT = Value
                Me.OnPropertyChanged(New System.ComponentModel.PropertyChangedEventArgs("SLSSTAT"))
                If Not mIsOnInit Then
                    mVar_DirtySLSSTAT = True
                End If
            End Set
        End Property
        Public Property SLSSPV As System.String
            Get
                Return mVar_SLSSPV
            End Get
            Set(ByVal Value As System.String)
                mVar_SLSSPV = Value
                Me.OnPropertyChanged(New System.ComponentModel.PropertyChangedEventArgs("SLSSPV"))
                If Not mIsOnInit Then
                    mVar_DirtySLSSPV = True
                End If
            End Set
        End Property
        Public Property SLSDAPR As System.DateTime
            Get
                Return mVar_SLSDAPR
            End Get
            Set(ByVal Value As System.DateTime)
                mVar_SLSDAPR = Value
                Me.OnPropertyChanged(New System.ComponentModel.PropertyChangedEventArgs("SLSDAPR"))
                If Not mIsOnInit Then
                    mVar_DirtySLSDAPR = True
                End If
            End Set
        End Property
        Public Property SLRDCRE As System.DateTime
            Get
                Return mVar_SLRDCRE
            End Get
            Set(ByVal Value As System.DateTime)
                mVar_SLRDCRE = Value
                Me.OnPropertyChanged(New System.ComponentModel.PropertyChangedEventArgs("SLRDCRE"))
                If Not mIsOnInit Then
                    mVar_DirtySLRDCRE = True
                End If
            End Set
        End Property
        Public Property SLRDMAJ As System.DateTime
            Get
                Return mVar_SLRDMAJ
            End Get
            Set(ByVal Value As System.DateTime)
                mVar_SLRDMAJ = Value
                Me.OnPropertyChanged(New System.ComponentModel.PropertyChangedEventArgs("SLRDMAJ"))
                If Not mIsOnInit Then
                    mVar_DirtySLRDMAJ = True
                End If
            End Set
        End Property
        Public Property SLRUTIL As System.String
            Get
                Return mVar_SLRUTIL
            End Get
            Set(ByVal Value As System.String)
                mVar_SLRUTIL = Value
                Me.OnPropertyChanged(New System.ComponentModel.PropertyChangedEventArgs("SLRUTIL"))
                If Not mIsOnInit Then
                    mVar_DirtySLRUTIL = True
                End If
            End Set
        End Property
        Public Property SLRPROG As System.String
            Get
                Return mVar_SLRPROG
            End Get
            Set(ByVal Value As System.String)
                mVar_SLRPROG = Value
                Me.OnPropertyChanged(New System.ComponentModel.PropertyChangedEventArgs("SLRPROG"))
                If Not mIsOnInit Then
                    mVar_DirtySLRPROG = True
                End If
            End Set
        End Property
        Public Property SLUSRUPD As System.String
            Get
                Return mVar_SLUSRUPD
            End Get
            Set(ByVal Value As System.String)
                mVar_SLUSRUPD = Value
                Me.OnPropertyChanged(New System.ComponentModel.PropertyChangedEventArgs("SLUSRUPD"))
                If Not mIsOnInit Then
                    mVar_DirtySLUSRUPD = True
                End If
            End Set
        End Property
        Public ReadOnly Property SLSIDIsDirty As Boolean
            Get
                Return mVar_DirtySLSID
            End Get
        End Property
        Public ReadOnly Property SLSNOIsDirty As Boolean
            Get
                Return mVar_DirtySLSNO
            End Get
        End Property
        Public ReadOnly Property SLSDATEIsDirty As Boolean
            Get
                Return mVar_DirtySLSDATE
            End Get
        End Property
        Public ReadOnly Property SLSNOTAIsDirty As Boolean
            Get
                Return mVar_DirtySLSNOTA
            End Get
        End Property
        Public ReadOnly Property SLSSTOREIsDirty As Boolean
            Get
                Return mVar_DirtySLSSTORE
            End Get
        End Property
        Public ReadOnly Property SLSARTCEXTIsDirty As Boolean
            Get
                Return mVar_DirtySLSARTCEXT
            End Get
        End Property
        Public ReadOnly Property SLSBARCODEIsDirty As Boolean
            Get
                Return mVar_DirtySLSBARCODE
            End Get
        End Property
        Public ReadOnly Property SLSSIZEIsDirty As Boolean
            Get
                Return mVar_DirtySLSSIZE
            End Get
        End Property
        Public ReadOnly Property SLSCOLORIsDirty As Boolean
            Get
                Return mVar_DirtySLSCOLOR
            End Get
        End Property
        Public ReadOnly Property SLSQTYIsDirty As Boolean
            Get
                Return mVar_DirtySLSQTY
            End Get
        End Property
        Public ReadOnly Property SLSDISCIsDirty As Boolean
            Get
                Return mVar_DirtySLSDISC
            End Get
        End Property
        Public ReadOnly Property SLSDISCAMOUNTIsDirty As Boolean
            Get
                Return mVar_DirtySLSDISCAMOUNT
            End Get
        End Property
        Public ReadOnly Property SLSAMTIsDirty As Boolean
            Get
                Return mVar_DirtySLSAMT
            End Get
        End Property
        Public ReadOnly Property SLSTOTAMTIsDirty As Boolean
            Get
                Return mVar_DirtySLSTOTAMT
            End Get
        End Property
        Public ReadOnly Property SLSPRICEIsDirty As Boolean
            Get
                Return mVar_DirtySLSPRICE
            End Get
        End Property
        Public ReadOnly Property SLSFLAGIsDirty As Boolean
            Get
                Return mVar_DirtySLSFLAG
            End Get
        End Property
        Public ReadOnly Property SLSSTATIsDirty As Boolean
            Get
                Return mVar_DirtySLSSTAT
            End Get
        End Property
        Public ReadOnly Property SLSSPVIsDirty As Boolean
            Get
                Return mVar_DirtySLSSPV
            End Get
        End Property
        Public ReadOnly Property SLSDAPRIsDirty As Boolean
            Get
                Return mVar_DirtySLSDAPR
            End Get
        End Property
        Public ReadOnly Property SLRDCREIsDirty As Boolean
            Get
                Return mVar_DirtySLRDCRE
            End Get
        End Property
        Public ReadOnly Property SLRDMAJIsDirty As Boolean
            Get
                Return mVar_DirtySLRDMAJ
            End Get
        End Property
        Public ReadOnly Property SLRUTILIsDirty As Boolean
            Get
                Return mVar_DirtySLRUTIL
            End Get
        End Property
        Public ReadOnly Property SLRPROGIsDirty As Boolean
            Get
                Return mVar_DirtySLRPROG
            End Get
        End Property
        Public ReadOnly Property SLUSRUPDIsDirty As Boolean
            Get
                Return mVar_DirtySLUSRUPD
            End Get
        End Property
#End Region
        ''[------------------------------------------------------------------------]'
        Public Function SaveToDataSource() As String
            Dim msgErr As String
            msgErr = ""
            If mVar_DirtySLSID Then
                Try
                    DataSource.Fields("SLSID") = mVar_SLSID
                Catch e As Exception
                    msgErr = msgErr & e.Message
                End Try
            End If

            If mVar_DirtySLSNO Then
                Try
                    DataSource.Fields("SLSNO") = mVar_SLSNO
                Catch e As Exception
                    msgErr = msgErr & e.Message
                End Try
            End If

            If mVar_DirtySLSDATE Then
                Try
                    DataSource.Fields("SLSDATE") = Format(mVar_SLSDATE, DataSource.DbConn.DateFormat)
                Catch e As Exception
                    msgErr = msgErr & e.Message
                End Try
            End If

            If mVar_DirtySLSNOTA Then
                Try
                    DataSource.Fields("SLSNOTA") = mVar_SLSNOTA
                Catch e As Exception
                    msgErr = msgErr & e.Message
                End Try
            End If

            If mVar_DirtySLSSTORE Then
                Try
                    DataSource.Fields("SLSSTORE") = mVar_SLSSTORE
                Catch e As Exception
                    msgErr = msgErr & e.Message
                End Try
            End If

            If mVar_DirtySLSARTCEXT Then
                Try
                    DataSource.Fields("SLSARTCEXT") = mVar_SLSARTCEXT
                Catch e As Exception
                    msgErr = msgErr & e.Message
                End Try
            End If

            If mVar_DirtySLSBARCODE Then
                Try
                    DataSource.Fields("SLSBARCODE") = mVar_SLSBARCODE
                Catch e As Exception
                    msgErr = msgErr & e.Message
                End Try
            End If

            If mVar_DirtySLSSIZE Then
                Try
                    DataSource.Fields("SLSSIZE") = mVar_SLSSIZE
                Catch e As Exception
                    msgErr = msgErr & e.Message
                End Try
            End If

            If mVar_DirtySLSCOLOR Then
                Try
                    DataSource.Fields("SLSCOLOR") = mVar_SLSCOLOR
                Catch e As Exception
                    msgErr = msgErr & e.Message
                End Try
            End If

            If mVar_DirtySLSQTY Then
                Try
                    DataSource.Fields("SLSQTY") = mVar_SLSQTY
                Catch e As Exception
                    msgErr = msgErr & e.Message
                End Try
            End If

            If mVar_DirtySLSDISC Then
                Try
                    DataSource.Fields("SLSDISC") = mVar_SLSDISC
                Catch e As Exception
                    msgErr = msgErr & e.Message
                End Try
            End If

            If mVar_DirtySLSDISCAMOUNT Then
                Try
                    DataSource.Fields("SLSDISCAMOUNT") = mVar_SLSDISCAMOUNT
                Catch e As Exception
                    msgErr = msgErr & e.Message
                End Try
            End If

            If mVar_DirtySLSAMT Then
                Try
                    DataSource.Fields("SLSAMT") = mVar_SLSAMT
                Catch e As Exception
                    msgErr = msgErr & e.Message
                End Try
            End If

            If mVar_DirtySLSTOTAMT Then
                Try
                    DataSource.Fields("SLSTOTAMT") = mVar_SLSTOTAMT
                Catch e As Exception
                    msgErr = msgErr & e.Message
                End Try
            End If

            If mVar_DirtySLSPRICE Then
                Try
                    DataSource.Fields("SLSPRICE") = mVar_SLSPRICE
                Catch e As Exception
                    msgErr = msgErr & e.Message
                End Try
            End If

            If mVar_DirtySLSFLAG Then
                Try
                    DataSource.Fields("SLSFLAG") = mVar_SLSFLAG
                Catch e As Exception
                    msgErr = msgErr & e.Message
                End Try
            End If

            If mVar_DirtySLSSTAT Then
                Try
                    DataSource.Fields("SLSSTAT") = mVar_SLSSTAT
                Catch e As Exception
                    msgErr = msgErr & e.Message
                End Try
            End If

            If mVar_DirtySLSSPV Then
                Try
                    DataSource.Fields("SLSSPV") = mVar_SLSSPV
                Catch e As Exception
                    msgErr = msgErr & e.Message
                End Try
            End If

            If mVar_DirtySLSDAPR Then
                Try
                    DataSource.Fields("SLSDAPR") = Format(mVar_SLSDAPR, DataSource.DbConn.DateFormat)
                Catch e As Exception
                    msgErr = msgErr & e.Message
                End Try
            End If

            If mVar_DirtySLRDCRE Then
                Try
                    DataSource.Fields("SLRDCRE") = Format(mVar_SLRDCRE, DataSource.DbConn.DateFormat)
                Catch e As Exception
                    msgErr = msgErr & e.Message
                End Try
            End If

            If mVar_DirtySLRDMAJ Then
                Try
                    DataSource.Fields("SLRDMAJ") = Format(mVar_SLRDMAJ, DataSource.DbConn.DateFormat)
                Catch e As Exception
                    msgErr = msgErr & e.Message
                End Try
            End If

            If mVar_DirtySLRUTIL Then
                Try
                    DataSource.Fields("SLRUTIL") = mVar_SLRUTIL
                Catch e As Exception
                    msgErr = msgErr & e.Message
                End Try
            End If

            If mVar_DirtySLRPROG Then
                Try
                    DataSource.Fields("SLRPROG") = mVar_SLRPROG
                Catch e As Exception
                    msgErr = msgErr & e.Message
                End Try
            End If

            If mVar_DirtySLUSRUPD Then
                Try
                    DataSource.Fields("SLUSRUPD") = mVar_SLUSRUPD
                Catch e As Exception
                    msgErr = msgErr & e.Message
                End Try
            End If

            Return msgErr
        End Function

        ''[------------------------------------------------------------------------]'
        Public Sub ClearDirty()
            mVar_DirtySLSID = False
            mVar_DirtySLSNO = False
            mVar_DirtySLSDATE = False
            mVar_DirtySLSNOTA = False
            mVar_DirtySLSSTORE = False
            mVar_DirtySLSARTCEXT = False
            mVar_DirtySLSBARCODE = False
            mVar_DirtySLSSIZE = False
            mVar_DirtySLSCOLOR = False
            mVar_DirtySLSQTY = False
            mVar_DirtySLSDISC = False
            mVar_DirtySLSDISCAMOUNT = False
            mVar_DirtySLSAMT = False
            mVar_DirtySLSTOTAMT = False
            mVar_DirtySLSPRICE = False
            mVar_DirtySLSFLAG = False
            mVar_DirtySLSSTAT = False
            mVar_DirtySLSSPV = False
            mVar_DirtySLSDAPR = False
            mVar_DirtySLRDCRE = False
            mVar_DirtySLRDMAJ = False
            mVar_DirtySLRUTIL = False
            mVar_DirtySLRPROG = False
            mVar_DirtySLUSRUPD = False
        End Sub
        ''[------------------------------------------------------------------------]'
        Public Sub SetDirty()
            mVar_DirtySLSID = True
            mVar_DirtySLSNO = True
            mVar_DirtySLSDATE = True
            mVar_DirtySLSNOTA = True
            mVar_DirtySLSSTORE = True
            mVar_DirtySLSARTCEXT = True
            mVar_DirtySLSBARCODE = True
            mVar_DirtySLSSIZE = True
            mVar_DirtySLSCOLOR = True
            mVar_DirtySLSQTY = True
            mVar_DirtySLSDISC = True
            mVar_DirtySLSDISCAMOUNT = True
            mVar_DirtySLSAMT = True
            mVar_DirtySLSTOTAMT = True
            mVar_DirtySLSPRICE = True
            mVar_DirtySLSFLAG = True
            mVar_DirtySLSSTAT = True
            mVar_DirtySLSSPV = True
            mVar_DirtySLSDAPR = True
            mVar_DirtySLRDCRE = True
            mVar_DirtySLRDMAJ = True
            mVar_DirtySLRUTIL = True
            mVar_DirtySLRPROG = True
            mVar_DirtySLUSRUPD = True
        End Sub

    End Class
End Namespace